import 'package:flutter/material.dart';
import 'package:flutter_create_framework/util/screen_util.dart';

class WarnButton extends StatelessWidget {

  WarnButton({Key key,this.onTap,@required this.text}) : super(key: key);
  Function onTap;
  String text;

  @override
  Widget build(BuildContext context) {
    return FlatButton(
        onPressed:onTap,
        child: Container(
          width: Pxw(context, 97),
          height: Pxh(context, 32),
          decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(2),
              border: Border.all(width: Pxw(context, 1),color: Color(0xffFF4D4F))
          ),
          alignment: Alignment.center,
          child: Text(
            text,
            style: TextStyle(
                fontSize: Pxsp(context, 14), color: Color(0xffFF4D4F)),
          ),
        ));
  }
}
